﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SyncList.Business.Persistence;
using SyncList.Business.ValueObject;

namespace SyncList.UserInterface
{


    /// <summary>
    /// Gestionnaire de démarrage d'application
    /// </summary>
    public static class StartHelper
    {

        /// <summary>
        /// Démarrer
        /// </summary>
        /// <param name="menuBar">Barre de menu</param>
        public static void Start(UCMenuBar menuBar)
        {
            SyncListSettings settings = MemoryStorage.Instance.Settings;
            menuBar.DataContext = settings;
            if (String.IsNullOrWhiteSpace(settings.UserName))
                WindowsAccessor.OpenApplicationSettings(settings);
        }

    }

}
